<template>
	<view>
		<!-- 日历 -->
		<calendar ref="calendar" :start-date="vuexStartDateObj.dateStr" :end-date="vuexEndDateObj.dateStr" :mode="mode" :is-show="true" theme-color="#D3A358" @callback="getDate" />
	</view>
</template>

<script>
	import {
		sliceDate,
		get_timestamp
	} from "@/common/function/tools.js"
	export default {
		data() {
			return {
				mode:2,
				startDate:'',
				endDate:'',
			};
		},
		onLoad(opt) {
			//order_sup==3小时房
			this.mode = opt.order_sup == 3 ? 1 : 2
		},
		methods:{
			getDate(e) {
				console.log(e);
				this.$u.vuex('vuexStartDateObj', e.startStr)
				this.$u.vuex('vuexEndDateObj', e.endStr ||  e.startStr)
				this.$u.vuex('vuexDayCount', e.dayCount || 1)
				uni.$emit('resetListFun','date')
				setTimeout(()=>{
					this.$m.to_back()
				},200)
			},
		}
	}
</script>

<style lang="scss">

</style>
